
<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<title>Contact</title>
<!-- for-mobile-apps -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="" />
<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false);
		function hideURLbar(){ window.scrollTo(0,1); } </script>
<!-- //for-mobile-apps -->
<link th:href="@{/adminlte/css/bootstrap.css}" rel="stylesheet" type="text/css" media="all" />
<!-- menu -->
<link th:href="@{/adminlte/css/component.css}" rel="stylesheet" type="text/css" />
<!-- //menu -->
<link th:href="@{/adminlte/css/style.css}" rel="stylesheet" type="text/css" media="all" />
<!-- js -->
<script type="text/javascript" th:src="@{/adminlte/js/jquery-2.1.4.min.js}"></script>
<!-- //js -->
<!-- fonts -->
<link th:href="@{http://fonts.googleapis.com/css?family=Gabriela}" rel='stylesheet' type='text/css'>
<link th:href="@{http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800}" rel='stylesheet' type='text/css'>
<!-- //fonts -->
	<!-- start-smoth-scrolling -->
		<script type="text/javascript" th:src="@{/adminlte/js/move-top.js}"></script>
		<script type="text/javascript" th:src="@{/adminlte/js/easing.js}"></script>
		<script type="text/javascript">
			jQuery(document).ready(function($) {
				$(".scroll").click(function(event){		
					event.preventDefault();
					$('html,body').animate({scrollTop:$(this.hash).offset().top},1000);
				});
			});
		</script>
	<!-- start-smoth-scrolling -->
<!--animate-->
<link th:href="@{/adminlte/css/animate.css}" rel="stylesheet" type="text/css" media="all">
<script th:src="@{/adminlte/js/wow.min.js}"></script>
	<script>
		 new WOW().init();

		//发送验证码
		 function check() {
			 if (/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/.test($("#email").val()) == false)
			 {
			 	alert("邮箱格式错误,请重新输入")
			 	//$("#errorMassage").text("邮箱格式错误");
			 }
			 $("#sendCode").attr("disabled","true"); //设置变灰按钮
			 $.post("/sendCode",
					 {email:$("#email").val()},function (result) {

					 })
			 setTimeout("$('#sendCode').removeAttr('disabled')",60000); //设置60秒后提交按钮 显示
		 }
		//忘记密码
		 function forgetPwd(){
			 var password = $("#password").val(),
					 VerifyPassword=$("#verifyPwd").val(),

					 flag = false;
				if (!(password==VerifyPassword)){
					alert("两次密码输入不一致！");
				}else{
					$.post("/forgetPwd",
							{uName:$("#name").val(),uPwd:$("#password").val() ,code:$("#Code").val()}
							,
							function(message){
								alert(message);
								return false;
							}
					);
				}
		 }


	</script>


<!--//end-animate-->
</head>
<body class="cbp-spmenu-push">
	 <!--top-header-->
		<!--bottom-->
	 <section th:replace="~{/fragment/SectionButton :: SectionButton}"/>
	 <nav th:replace="~{fragment/nav :: nav}"/>
		  
		<!-- Classie - class helper functions by @desandro https://github.com/desandro/classie -->
		<script th:src="@{/adminlte/js/classie.js}"></script>
		<script>
			var menuLeft = document.getElementById( 'cbp-spmenu-s1' ),
				showLeftPush = document.getElementById( 'showLeftPush' ),
				showRightPush = document.getElementById( 'showRightPush' ),
				body = document.body;

			showLeftPush.onclick = function() {
				classie.toggle( this, 'active' );
				classie.toggle( body, 'cbp-spmenu-push-toright' );
				classie.toggle( menuLeft, 'cbp-spmenu-open' );
				disableOther( 'showLeftPush' );
			};

			function disableOther( button ) {
				if( button !== 'showLeftPush' ) {
					classie.toggle( showLeftPush, 'disabled' );
				}
				if( button !== 'showRightPush' ) {
					classie.toggle( showRightPush, 'disabled' );
				}
			}
		</script>
<!-- banner -->
<div class="banner ">
	<div class="banner-left page-head">
		<div class="grid__item wow fadeInDown animated" data-wow-delay=".5s">
			<h1><a class="link link--ilin" th:href="@{index.html}"><span>Royal 主页 </span><span>Shine</span></a></h1>
		</div>
		<div class="clearfix"></div>
	</div>
</div>
<!-- 用户注册 -->
<div class="contact">
	<div class="container">
		
		<h3 class="tittle">用户重置密码</h3>
		<div class="contact-grids">
			
			<div id="userForm" class="col-centre contact-grid wow fadeInRight animated" data-wow-delay=".5s">
				<form>
					<input type="text" value="Name" id="name" name="uName" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Name';}" required="">
					<input type="email" value="Email" id="email" name="email" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Email';}" required="">
					<input type="password" value="Password" id="password" name="uPwd" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Password';}" required="">
					<input type="password" value="VerifyPassword" id="verifyPwd" name="verifyPwd" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'VerifyPassword';}" required="">
					<input type="text" value="Code" id="Code" name="code" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = 'Code';}" required="">
					<input type="submit" onsubmit="check()" id="sendCode"  onclick="check()" value="发验证码">
					<input type="submit"  id="forgetPwd"   value="重置密码" >
					<a th:href="toLogin">返回登录</a>
				</form>
			</div>
		</div>
	</div>
</div>
<!-- //contact -->
	 <div th:replace="~{/fragment/footer :: footer}"/>
<!-- for bootstrap working -->
	<script th:src="@{/adminlte/js/bootstrap.js}"></script>
<!-- //for bootstrap working -->
<!-- smooth scrolling -->
	<script type="text/javascript">
		$(document).ready(function() {

			$("#userForm").submit(function () {
				forgetPwd();
			})
		/*
			var defaults = {
			containerID: 'toTop', // fading element id
			containerHoverID: 'toTopHover', // fading element hover id
			scrollSpeed: 1200,
			easingType: 'linear' 
			};
		*/								
		$().UItoTop({ easingType: 'easeOutQuart' });
		});
	</script>
	<a th:href="@{#}" id="toTop" style="display: block;"> <span id="toTopHover" style="opacity: 1;"> </span></a>
<!-- //smooth scrolling -->

</body>
</html>